package com.gdawj.javabeans;

import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.NamedNativeQuery;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.QueryHint;



@Entity
@NamedQueries({
    @NamedQuery(name="listeEnseignant",query="SELECT e FROM Enseignant e WHERE e.nom=:fnom",
    hints={@QueryHint(name="eclipselink.cache-usage",value="DoNotCheckCache")}
    )
})
public class Enseignant extends Personne{

    @OneToMany(mappedBy="enseignant",cascade=CascadeType.PERSIST)
    private List<Enseigne> listePromotion;
    @OneToMany(mappedBy="enseignant",cascade=CascadeType.PERSIST)
    private List<Enseigne> listeMatiere;


    public Enseignant()
    {
        System.out.println("Dans le constructeur de la classe Enseignant");
    }

   
    public List<Enseigne> getListeMatiere() {
        return listeMatiere;
    }

    public void setListeMatiere(List<Enseigne> listeMatiere) {
        this.listeMatiere = listeMatiere;
    }

    public List<Enseigne> getListePromotion() {
        return listePromotion;
    }

    public void setListePromotion(List<Enseigne> listePromotion) {
        this.listePromotion = listePromotion;
    }

      


}
